//package com.wnhz.work.yz.fragment;
//
//import android.os.Bundle;
//import android.os.Handler;
//import android.os.Message;
//import android.support.annotation.Nullable;
//import android.support.v7.widget.LinearLayoutManager;
//import android.support.v7.widget.RecyclerView;
//import android.util.Log;
//import android.view.LayoutInflater;
//import android.view.View;
//import android.view.ViewGroup;
//import android.widget.LinearLayout;
//
//import com.wnhz.work.yz.MyApplication;
//import com.wnhz.work.yz.R;
//import com.wnhz.work.yz.base.BaseFragment;
//import com.wnhz.work.yz.base.BaseRVAdapter;
//import com.wnhz.work.yz.base.BaseViewHolder;
//import com.wnhz.work.yz.base.RecycleViewDivider;
//import com.wnhz.work.yz.bean.FitmentBean;
//import com.wnhz.work.yz.utils.Url;
//import com.wnhz.work.yz.utils.xutils3.MyCallBack;
//import com.wnhz.work.yz.utils.xutils3.XUtil;
//
//import java.util.ArrayList;
//import java.util.Hashtable;
//import java.util.List;
//import java.util.Map;
//
///**
// * Created by d on 2017/1/9.
// */
//
//public class FurnitureFragment extends BaseFragment {
//
//    public static FurnitureFragment newInstance() {
//        return new FurnitureFragment();
//    }
//
//    private RecyclerView recyclerView;
//    private BaseRVAdapter<FitmentBean> adapter;
//    private List<FitmentBean> mList = new ArrayList<>();
//
//    @Nullable
//    @Override
//    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
//
//        return inflater.inflate(R.layout.fragment_recyclerview, null);
//    }
//
//
//    @Override
//    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
//        super.onActivityCreated(savedInstanceState);
//        upLoad();
//
//
//    }
//
//    private void initData() {
//        for (int i = 0; i < 4; i++) {
//            mList.add(new FitmentBean());
//        }
//        recyclerView = (RecyclerView) getView().findViewById(R.id.recyclerView);
//        recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
//        adapter = new BaseRVAdapter<FitmentBean>(getContext(), mList) {
//            @Override
//            public int getLayoutId(int viewType) {
//                return R.layout.item_start_order_shopping;
//            }
//
//            @Override
//            public void onBind(BaseViewHolder holder, int position) {
//                holder.setVisibility(R.id.number_tv, false);
//            }
//        };
//        recyclerView.addItemDecoration(new RecycleViewDivider(getContext(), LinearLayout.HORIZONTAL
//                , R.drawable.line_shape));
//        recyclerView.setAdapter(adapter);
//    }
//
//
//    private void upLoad() {
//        Map<String, Object> map = new Hashtable<>();
//        map.put("type", "1");
//        map.put("token", MyApplication.getInstance().getUserBean().getToken());
////        UCENTER_GETCOLLECTLIST
//        XUtil.Post(Url.UCENTER_GETCOLLECTLIST, map, new MyCallBack<String>() {
//            @Override
//            public void onSuccess(String result) {
//                super.onSuccess(result);
//                Log.e("------", result);
//            }
//
//            @Override
//            public void onFinished() {
//                if (mList.size() == 0) {
//                    return;
//                }
//                handler.sendEmptyMessage(1);
//                super.onFinished();
//            }
//        });
//    }
//
//    Handler handler = new Handler() {
//        @Override
//        public void handleMessage(Message msg) {
//            initData();
//            super.handleMessage(msg);
//        }
//    };
//
//    @Override
//    public void onDestroy() {
//        handler.removeCallbacks(null);
//        super.onDestroy();
//    }
//}
